<?php $this->_extends('_layouts/cib_layout'); ?>

<?php $this->_block('metainfo'); ?>
    <title><?=$currentNews->title;?> —— <?=$currentNews->category->category;?> —— 新闻/通知 —— 上海外国语大学国际工商管理学院</title>
    <meta name="Description" content="上海外国语大学国际工商管理学院,SISUCIB,新闻/通知,<?=$currentNews->title;?>" />
    <meta name="Keywords"    content="上海外国语大学国际工商管理学院,SISUCIB,新闻/通知,<?=$currentNews->title;?>" />
    <link rel="stylesheet" type="text/css" href="profiles/<?=Q::ini('appini/skin');?>/cib-newsnotice.css" />
    <style type="text/css" media="all"><?=$css;?></style>
    <!--[if IE 6]>
    <style>#news div{padding-left:0;padding-right:0;}#news{width:60.8%;}</style>
    <![endif]-->
<?php $this->_endblock('metainfo'); ?>

<?php $this->_block('container'); ?>
<?php $this->_element('g-wadgets/g-wadgets-location'); ?>

<div id="container">
    <div id="news">
        
        <?php $this->_element('g-pieces/newsnotice/g-pieces-newsnotice-news-title'); ?>
        <?php $this->_element('g-pieces/newsnotice/g-pieces-newsnotice-news-preinfo'); ?>
        <?php $this->_element('g-pieces/newsnotice/g-pieces-newsnotice-news-sticky'); ?>
        <?php $this->_element('g-pieces/newsnotice/g-pieces-newsnotice-news-body'); ?>
        <?php $this->_element('g-pieces/newsnotice/g-pieces-newsnotice-news-attachments'); ?>
        <?php $this->_element('g-pieces/newsnotice/g-pieces-newsnotice-news-specialinfo'); ?>

    </div><!-- /news -->

    <div id="freshnews">

        <?php $this->_element('g-pieces/newsnotice/g-pieces-newsnotice-sticky-news'); ?>
        
        <?php $this->_element('g-pieces/newsnotice/g-pieces-newsnotice-search-news'); ?>

        <div id="freshnews-news" class="freshnews-panel tz369">
            <h2>新闻</h2>
            <ul>
                <li>
                    <ul class="key-menu4news">
                        <?php foreach(NewsCategory::find('id = 4 OR parent_id = 4')->all()->order('id ASC')->query() as $nc) { ?>
                        <?php /* order('id ASC') 为修正*/ ?>
                        <li>
                            <a href="<?=url('newsnotice/index', array('subaction'=>'news', 'ctgry_id'=>$nc->id, 'category'=>NewsCategory::find('id = ?', $nc->id)->query()->category));?>">
                            <?=$nc->category;?></a>
                        </li>
                        <?php } ?>
                    </ul>
                </li>
                <li><?php $this->_control('pagination', 'pgnv-n1', array('pagination' => $newspg, 'url_args'=>array('subaction'=>'news', 'ctgry_id'=>$_SESSION['news_cur_ctgry'], 'category'=>NewsCategory::find('id = ?', $_SESSION['news_cur_ctgry'])->query()->category))); ?></li>
                <?php foreach($news as $key => $n) { ?>
                <li>
                    <a title="<?=mb_substr(strip_tags($n->body), 0, Q::ini('appini/alink_title'), 'utf-8');?>" href="<?=url('newsnotice/index', array('news_id'=>$n->news_id, 'title'=>mb_substr($n->title, 0, Q::ini('appini/ahref_title'), 'utf-8')));?>">
                    <?=$key+1;?>. <?=$n->title;?>
                    <?php if(!$n->attachments->isEmpty()) { ?>
                    <img src="misc/with-attachment.gif" alt="attachmentMark" />
                    <?php } ?>
                    <?php if($n->isprivate == 1) { ?>
                    <img src="misc/shield_add.png" alt="isprivateMark" />
                    <?php } ?>
                    <span class="time"><?=$n->adate;?></span></a>
                </li>
                <?php } ?>
                <li><?php $this->_control('pagination', 'pgnv-n1', array('pagination' => $newspg, 'url_args'=>array('subaction'=>'news', 'ctgry_id'=>$_SESSION['news_cur_ctgry'], 'category'=>NewsCategory::find('id = ?', $_SESSION['news_cur_ctgry'])->query()->category))); ?></li>
            </ul>
        </div><!-- /.freshnews-panel-->

        <div id="freshnews-notice" class="freshnews-panel tz369">
            <h2>通知</h2>
            <ul>
                <li>
                    <ul class="key-menu4news">
                        <?php foreach(NewsCategory::find('id = 23 OR parent_id = 23')->all()->order('id DESC')->query() as $ntc) { ?>
                        <?php /* order('id DESC') 为修正*/ ?>
                        <li>
                            <a href="<?=url('newsnotice/index', array('subaction'=>'notice', 'ctgry_id'=>$ntc->id, 'category'=>NewsCategory::find('id = ?', $ntc->id)->query()->category));?>">
                            <?=$ntc->category;?></a>
                        </li>
                        <?php } ?>
                    </ul>
                </li>
                <li><?php $this->_control('pagination', 'pgnv-n1', array('pagination' => $noticepg, 'url_args'=>array('subaction'=>'notice', 'ctgry_id'=>$_SESSION['notice_cur_ctgry'], 'category'=>NewsCategory::find('id = ?', $_SESSION['notice_cur_ctgry'])->query()->category))); ?></li>
                <?php foreach($notice as $key => $n) { ?>
                <li>
                    <a title="<?=mb_substr(strip_tags($n->body), 0, Q::ini('appini/alink_title'), 'utf-8');?>" href="<?=url('newsnotice/index', array('news_id'=>$n->news_id, 'title'=>mb_substr($n->title, 0, Q::ini('appini/ahref_title'), 'utf-8')));?>">
                    <?=$key+1;?>. <?=$n->title;?>
                    <?php if(!$n->attachments->isEmpty()) { ?>
                    <img src="misc/with-attachment.gif" alt="attachmentMark" />
                    <?php } ?>
                    <?php if($n->isprivate == 1) { ?>
                    <img src="misc/shield_add.png" alt="isprivateMark" />
                    <?php } ?>
                    <span class="time"><?=$n->adate;?></span></a>
                </li>
                <?php } ?>
                <li><?php $this->_control('pagination', 'pgnv-n1', array('pagination' => $noticepg, 'url_args'=>array('subaction'=>'notice', 'ctgry_id'=>$_SESSION['notice_cur_ctgry'], 'category'=>NewsCategory::find('id = ?', $_SESSION['notice_cur_ctgry'])->query()->category))); ?></li>
            </ul>
        </div><!-- /.freshnews-panel-->

        <div id="freshnews-exchange" class="freshnews-panel tz369">
            <h2>学术交流</h2>
            <ul>
                <li>
                    <ul class="key-menu4news">
                        <?php foreach(NewsCategory::find('id = 8 OR parent_id = 8')->all()->order('id ASC')->query() as $sc) { ?>
                        <?php /* order('id ASC') 为修正*/ ?>
                        <li>
                            <a href="<?=url('newsnotice/index', array('subaction'=>'exchange', 'ctgry_id'=>$sc->id, 'category'=>NewsCategory::find('id = ?', $sc->id)->query()->category));?>">
                            <?=$sc->category;?></a>
                        </li>
                        <?php } ?>
                    </ul>
                </li>
                <li><?php $this->_control('pagination', 'pgnv-n1', array('pagination' => $exchangepg, 'url_args'=>array('subaction'=>'exchange', 'ctgry_id'=>$_SESSION['exchange_cur_ctgry'], 'category'=>NewsCategory::find('id = ?', $_SESSION['exchange_cur_ctgry'])->query()->category))); ?></li>
                <?php foreach($exchange as $key => $n) { ?>
                <li>
                    <a  title="<?=mb_substr(strip_tags($n->body), 0, Q::ini('appini/alink_title'), 'utf-8');?>" href="<?=url('newsnotice/index', array('news_id'=>$n->news_id, 'title'=>mb_substr($n->title, 0, Q::ini('appini/ahref_title'), 'utf-8')));?>">
                    <?=$key+1;?>. <?=$n->title;?>
                    <?php if(!$n->attachments->isEmpty()) { ?>
                    <img src="misc/with-attachment.gif" alt="attachmentMark" />
                    <?php } ?>
                    <?php if($n->isprivate == 1) { ?>
                    <img src="misc/shield_add.png" alt="isprivateMark" />
                    <?php } ?>
                    <span class="time"><?=$n->adate;?></span></a>
                </li>
                <?php } ?>
                <li><?php $this->_control('pagination', 'pgnv-n1', array('pagination' => $exchangepg, 'url_args'=>array('subaction'=>'exchange', 'ctgry_id'=>$_SESSION['exchange_cur_ctgry'], 'category'=>NewsCategory::find('id = ?', $_SESSION['exchange_cur_ctgry'])->query()->category))); ?></li>
            </ul>
        </div><!-- /.freshnews-panel-->

        <div id="freshnews-students" class="freshnews-panel tz369">
            <h2>学子风采</h2>
            <ul>
                <li>
                    <ul class="key-menu4news">
                        <?php foreach(NewsCategory::find('id = 7 OR parent_id = 7')->all()->order('id ASC')->query() as $ec) { ?>
                        <?php /* order('id ASC') 为修正*/ ?>
                        <li>
                            <a href="<?=url('newsnotice/index', array('subaction'=>'students', 'ctgry_id'=>$ec->id,  'category'=>NewsCategory::find('id = ?', $sc->id)->query()->category));?>">
                            <?=$ec->category;?></a>
                        </li>
                        <?php } ?>
                    </ul>
                </li>
                <li><?php $this->_control('pagination', 'pgnv-n1', array('pagination' => $studentspg, 'url_args'=>array('subaction'=>'students', 'ctgry_id'=>$_SESSION['students_cur_ctgry'], 'category'=>NewsCategory::find('id = ?', $_SESSION['students_cur_ctgry'])->query()->category))); ?></li>
                <?php foreach($students as $key => $n) { ?>
                <li>
                    <a  title="<?=mb_substr(strip_tags($n->body), 0, Q::ini('appini/alink_title'), 'utf-8');?>" href="<?=url('newsnotice/index', array('news_id'=>$n->news_id, 'title'=>mb_substr($n->title, 0, Q::ini('appini/ahref_title'), 'utf-8')));?>">
                    <?=$key+1;?>. <?=$n->title;?>
                    <?php if(!$n->attachments->isEmpty()) { ?>
                    <img src="misc/with-attachment.gif" alt="attachmentMark" />
                    <?php } ?>
                    <?php if($n->isprivate == 1) { ?>
                    <img src="misc/shield_add.png" alt="isprivateMark" />
                    <?php } ?>
                    <span class="time"><?=$n->adate;?></span></a>
                </li>
                <?php } ?>
                <li><?php $this->_control('pagination', 'pgnv-n1', array('pagination' => $studentspg, 'url_args'=>array('subaction'=>'students', 'ctgry_id'=>$_SESSION['students_cur_ctgry'], 'category'=>NewsCategory::find('id = ?', $_SESSION['students_cur_ctgry'])->query()->category))); ?></li>
            </ul>
        </div><!-- /.freshnews-panel-->

    </div><!-- /freshnews -->
</div><!-- /container -->

<?php $this->_element('g-wadgets/g-wadgets-utility'); ?>
<?php $this->_endblock('container'); ?>